<?php
  class GoldRateAction extends CAction
  {
      public $view='';
      public function run(){
          $this->renderTable();
      }
      public function getGoldRate(){
          return GoldRate::model()->findLatestPrice();
      }
      public function renderTable(){
          $this->getController()->renderPartial($this->view,array('models'=>$this->getGoldRate()));
      }
  }
?>
